<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 店铺管理</title>
    <link href="./js/bootstrap.min.css" rel="stylesheet">
    <link href="./js/bootstrap-icons.css" rel="stylesheet">

    <link rel="stylesheet" href="css/index.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f8fafc;
        }

        /* 顶部导航栏 */
        .top-nav {
            height: 60px;
            background-color: #2563eb;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }

        .logo {
            font-size: 20px;
            font-weight: bold;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        /* 主体布局 */
        .main-container {
            display: flex;
            margin-top: 60px;
            height: calc(100vh - 60px);
        }

        /* 左侧菜单栏 */
        .sidebar {
            width: 220px;
            background-color: #1e293b;
            color: white;
            height: 100%;
            position: fixed;
            overflow-y: auto;
            transition: all 0.3s;
        }

        .sidebar.collapsed {
            width: 80px;
        }

        .menu-toggle {
            padding: 15px 20px;
            cursor: pointer;
            border-bottom: 1px solid #334155;
        }

        .menu-items {
            padding: 10px 0;
        }

        .menu-item {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .menu-item:hover {
            background-color: #334155;
        }

        .menu-item.active {
            background-color: #2563eb;
        }

        .menu-text {
            white-space: nowrap;
            overflow: hidden;
        }

        .sidebar.collapsed .menu-text {
            display: none;
        }

        .sidebar.collapsed .menu-item {
            justify-content: center;
        }

        /* 内容区 */
        .content {
            flex: 1;
            margin-left: 220px;
            padding: 20px;
            transition: margin-left 0.3s;
        }

        .sidebar.collapsed ~ .content {
            margin-left: 80px;
        }

        /* 面包屑导航 */
        .breadcrumb-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        /* 卡片样式 */
        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            padding: 20px;
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 20px;
        }

        /* 表格样式 */
        .table-container {
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        th {
            background-color: #f1f5f9;
            font-weight: 600;
            color: #1e293b;
        }

        tr:hover {
            background-color: #f8fafc;
        }

        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            border: none;
        }

        .btn-primary {
            background-color: #2563eb;
            color: white;
        }

        .btn-success {
            background-color: #10b981;
            color: white;
        }

        .btn-warning {
            background-color: #f59e0b;
            color: white;
        }

        .btn-danger {
            background-color: #ef4444;
            color: white;
        }

        .btn-outline {
            background-color: transparent;
            border: 1px solid #cbd5e1;
            color: #64748b;
        }

        /* 筛选器 */
        .filter-row {
            display: flex;
            gap: 15px;
            align-items: end;
            flex-wrap: wrap;
        }

        .filter-item {
            flex: 1;
            min-width: 200px;
        }

        .filter-item label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .filter-item input,
        .filter-item select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
        }

        /* 分页 */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 20px;
        }

        .page-item {
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            cursor: pointer;
        }

        .page-item.active {
            background-color: #2563eb;
            color: white;
        }

        /* 表单布局 */
        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-col {
            flex: 1;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
        }

        /* 上传区域 */
        .upload-area {
            border: 2px dashed #cbd5e1;
            border-radius: 4px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.3s;
        }

        .upload-area:hover {
            border-color: #2563eb;
        }

        .preview-images {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .preview-image {
            width: 100px;
            height: 100px;
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .preview-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .remove-image {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        /* 地图区域 */
        .map-container {
            height: 300px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            background: #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
        }

        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 8px;
            width: 600px;
            max-width: 90%;
            max-height: 90%;
            overflow-y: auto;
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-body {
            padding: 20px;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .close {
            font-size: 24px;
            cursor: pointer;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
            }
            
            .filter-row {
                flex-direction: column;
            }
            
            .filter-item {
                min-width: 100%;
            }
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="top-nav">
        <div class="logo">管理系统</div>
        <div class="user-info">
            <div class="notification-icon">🔔</div>
            <div class="user-dropdown">
                <span>管理员 ▼</span>
            </div>
        </div>
    </div>

    <!-- 主体布局 -->
    <div class="main-container">
        <!-- 左侧菜单栏 -->
        <div class="sidebar" id="sidebar">
            <div class="menu-toggle" onclick="toggleSidebar()">☰ 菜单</div>
            <div class="menu-items">
                <div class="menu-item">
                    <a href="./index.html">
                        <span>📊</span>
                        <span class="menu-text">仪表盘</span>
                    </a>
                  
                </div>
                <div class="menu-item active">
                    <a href="./dianpu.html">
                        <span>🏪</span>
                        <span class="menu-text">店铺管理</span>
                    </a>
                   
                </div>
                <div class="menu-item">
                    <a href="./jiqiren.html">
                        <span>🤖</span>
                        <span class="menu-text">机器人管理</span>
                    </a>
                 
                </div>
                <div class="menu-item">
                    <a href="./order.html">
                        <span>📋</span>
                        <span class="menu-text">订单管理</span>
                    </a>
                   
                </div>
                <div class="menu-item ">
                    <span>👥</span>
                    <span class="menu-text">用户会员管理</span>
                    <span>▶</span>
                </div>
                <div class="submenu">
                    <div class="submenu-item">
                        <a href="./user.html">
                            <span>├─</span>
                            <span class="menu-text">用户会员列表</span>
                        </a>
                      
                    </div>
                    <div class="submenu-item ">
                        <a href="./vip.html">
                            <span>├─</span>
                            <span class="menu-text">会员等级配置</span>
                        </a>
                        
                    </div>
                </div>
                <div class="menu-item ">
                    <a href="./fuwu.html">
                        <span>🎯</span>
                        <span class="menu-text">服务套餐类型</span>
                    </a>
                </div>
                <div class="menu-item">
                    <span>🎯</span>
                    <span class="menu-text">促销管理(二期)</span>
                </div>
                <div class="menu-item">
                    <span>📈</span>
                    <span class="menu-text">数据统计(二期)</span>
                </div>
                <div class="menu-item">
                    <span>⚙️</span>
                    <span class="menu-text">系统设置</span>
                </div>
            </div>
        </div>

        <!-- 中间内容区 -->
        <div class="content">
            <!-- 店铺列表页 -->
            <div id="storeListPage">
                <!-- 面包屑导航 -->
                <div class="breadcrumb-nav">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">店铺管理</li>
                            <li class="breadcrumb-item active">店铺列表</li>
                        </ol>
                    </nav>
                    <button class="btn btn-primary" onclick="showAddStoreForm()">
                        <i class="bi bi-plus-lg"></i> 新增店铺
                    </button>
                </div>

                <!-- 筛选器 -->
                <div class="card">
                    <div class="card-title">筛选条件</div>
                    <div class="filter-row">
                        <div class="filter-item">
                            <label>店铺名称</label>
                            <input type="text" placeholder="请输入店铺名称">
                        </div>
                        <div class="filter-item">
                            <label>状态</label>
                            <select>
                                <option value="">全部</option>
                                <option value="营业中">营业中</option>
                                <option value="休息中">休息中</option>
                                <option value="已禁用">已禁用</option>
                            </select>
                        </div>
                        <div class="filter-item">
                            <label>区域</label>
                            <select>
                                <option value="">全部</option>
                                <option value="北京">北京</option>
                                <option value="上海">上海</option>
                                <option value="广州">广州</option>
                            </select>
                        </div>
                        <div class="filter-item">
                            <button class="btn btn-primary">搜索</button>
                            <button class="btn btn-outline" style="margin-left: 10px;">重置</button>
                        </div>
                    </div>
                </div>

                <!-- 店铺表格 -->
                <div class="card">
                    <div class="table-container">
                        <table>
                            <thead>
                                <tr>
                                    <th><input type="checkbox"></th>
                                    <th>店铺ID</th>
                                    <th>店铺名称</th>
                                    <th>地址</th>
                                    <th>状态</th>
                                    <th>机器人数量</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><input type="checkbox"></td>
                                    <td>001</td>
                                    <td>朝阳店</td>
                                    <td>北京市朝阳区xxx街道</td>
                                    <td><span class="badge bg-success">营业中</span></td>
                                    <td>8台</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showEditStoreForm()">编辑</button>
                                        <button class="btn btn-warning btn-sm" onclick="showAssignRobotModal()">分配机器人</button>
                                        <button class="btn btn-danger btn-sm" onclick="toggleStoreStatus('禁用')">禁用</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox"></td>
                                    <td>002</td>
                                    <td>海淀店</td>
                                    <td>北京市海淀区xxx街道</td>
                                    <td><span class="badge bg-success">营业中</span></td>
                                    <td>6台</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showEditStoreForm()">编辑</button>
                                        <button class="btn btn-warning btn-sm" onclick="showAssignRobotModal()">分配机器人</button>
                                        <button class="btn btn-danger btn-sm" onclick="toggleStoreStatus('禁用')">禁用</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox"></td>
                                    <td>003</td>
                                    <td>丰台店</td>
                                    <td>北京市丰台区xxx街道</td>
                                    <td><span class="badge bg-warning">休息中</span></td>
                                    <td>5台</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showEditStoreForm()">编辑</button>
                                        <button class="btn btn-warning btn-sm" onclick="showAssignRobotModal()">分配机器人</button>
                                        <button class="btn btn-success btn-sm" onclick="toggleStoreStatus('启用')">启用</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <!-- 分页 -->
                <div class="pagination">
                    <button class="page-item">上一页</button>
                    <button class="page-item active">1</button>
                    <button class="page-item">2</button>
                    <button class="page-item">3</button>
                    <span>...</span>
                    <button class="page-item">12</button>
                    <button class="page-item">下一页</button>
                    <div style="display: flex; align-items: center; gap: 10px; margin-left: 20px;">
                        <span>跳至第</span>
                        <input type="number" style="width: 60px; padding: 5px;" min="1" max="12">
                        <span>页</span>
                        <button class="btn btn-outline">确定</button>
                    </div>
                </div>
            </div>

            <!-- 店铺编辑/新增页 -->
            <div id="storeFormPage" style="display: none;">
                <!-- 面包屑导航 -->
                <div class="breadcrumb-nav">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">店铺管理</li>
                            <li class="breadcrumb-item active" id="formTitle">新增店铺</li>
                        </ol>
                    </nav>
                    <div>
                        <button class="btn btn-primary" onclick="saveStore()">保存</button>
                        <button class="btn btn-outline" onclick="showStoreList()" style="margin-left: 10px;">取消</button>
                    </div>
                </div>

                <!-- 基础信息表单 -->
                <div class="card">
                    <div class="card-title">基础信息</div>
                    <div class="form-row">
                        <div class="form-col">
                            <div class="form-group">
                                <label>店铺名称 *</label>
                                <input type="text" placeholder="请输入店铺名称">
                            </div>
                            <div class="form-group">
                                <label>联系人 *</label>
                                <input type="text" placeholder="请输入联系人姓名">
                            </div>
                            <div class="form-group">
                                <label>联系电话 *</label>
                                <input type="tel" placeholder="请输入联系电话">
                            </div>
                            <div class="form-group">
                                <label>所在区域 *</label>
                                <div style="display: flex; gap: 10px;">
                                    <select style="flex: 1;">
                                        <option value="">请选择省份</option>
                                        <option value="北京市">北京市</option>
                                        <option value="上海市">上海市</option>
                                    </select>
                                    <select style="flex: 1;">
                                        <option value="">请选择城市</option>
                                        <option value="北京市">北京市</option>
                                    </select>
                                    <select style="flex: 1;">
                                        <option value="">请选择区县</option>
                                        <option value="朝阳区">朝阳区</option>
                                        <option value="海淀区">海淀区</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>详细地址 *</label>
                                <input type="text" placeholder="请输入详细地址">
                            </div>
                            <div class="form-group">
                                <label>营业时间 *</label>
                                <div style="display: flex; gap: 10px; align-items: center;">
                                    <input type="time" value="09:00">
                                    <span>-</span>
                                    <input type="time" value="22:00">
                                </div>
                            </div>
                            <div class="form-group">
                                <label>营业状态</label>
                                <div>
                                    <label style="margin-right: 20px;">
                                        <input type="radio" name="status" value="营业中" checked> 营业中
                                    </label>
                                    <label>
                                        <input type="radio" name="status" value="休息中"> 休息中
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-col">
                            <div class="form-group">
                                <label>店铺门头图</label>
                                <div class="upload-area" onclick="triggerFileUpload('storefront')">
                                    <i class="bi bi-cloud-upload" style="font-size: 24px;"></i>
                                    <p>点击上传或拖拽图片到此处</p>
                                    <p style="font-size: 12px; color: #64748b;">支持JPG、PNG格式，最大5MB</p>
                                </div>
                                <div class="preview-images">
                                    <div class="preview-image">
                                        <img src="https://placehold.co/100x100" alt="门头图">
                                        <button class="remove-image">×</button>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>环境图（最多5张）</label>
                                <div class="upload-area" onclick="triggerFileUpload('environment')">
                                    <i class="bi bi-cloud-upload" style="font-size: 24px;"></i>
                                    <p>点击上传或拖拽图片到此处</p>
                                </div>
                                <div class="preview-images">
                                    <div class="preview-image">
                                        <img src="https://placehold.co/100x100" alt="环境图">
                                        <button class="remove-image">×</button>
                                    </div>
                                    <div class="preview-image">
                                        <img src="https://placehold.co/100x100" alt="环境图">
                                        <button class="remove-image">×</button>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>机器人图</label>
                                <div class="upload-area" onclick="triggerFileUpload('robot')">
                                    <i class="bi bi-cloud-upload" style="font-size: 24px;"></i>
                                    <p>点击上传或拖拽图片到此处</p>
                                </div>
                                <div class="preview-images">
                                    <div class="preview-image">
                                        <img src="https://placehold.co/100x100" alt="机器人图">
                                        <button class="remove-image">×</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 服务设置 -->
                <div class="card">
                    <div class="card-title">服务配置</div>
                    <div class="form-group">
                        <label>支持服务类型</label>
                        <div>
                            <label style="margin-right: 20px;">
                                <input type="checkbox" checked> 基础洗头
                            </label>
                            <label style="margin-right: 20px;">
                                <input type="checkbox" checked> 头皮护理
                            </label>
                            <label>
                                <input type="checkbox"> 深层清洁
                            </label>
                        </div>
                    </div>
                    <div class="form-row">
                        <div class="form-group" style="flex: 1;">
                            <label>基础洗头价格（元）</label>
                            <input type="number" value="28">
                        </div>
                        <div class="form-group" style="flex: 1;">
                            <label>头皮护理价格（元）</label>
                            <input type="number" value="48">
                        </div>
                        <div class="form-group" style="flex: 1;">
                            <label>深层清洁价格（元）</label>
                            <input type="number" value="68">
                        </div>
                    </div>
                </div>

                <!-- 地图定位 -->
                <div class="card">
                    <div class="card-title">店铺定位</div>
                    <div class="form-group">
                        <label>地图定位</label>
                        <div class="map-container">
                            <div>
                                <i class="bi bi-geo-alt" style="font-size: 48px; color: #2563eb;"></i>
                                <p>地图组件区域</p>
                                <p style="font-size: 12px;">支持搜索地址或手动标记位置</p>
                            </div>
                        </div>
                    </div>
                    <div class="form-row">
                        <div class="form-group" style="flex: 1;">
                            <label>经度</label>
                            <input type="text" value="116.4074" readonly>
                        </div>
                        <div class="form-group" style="flex: 1;">
                            <label>纬度</label>
                            <input type="text" value="39.9042" readonly>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 机器人分配弹窗 -->
    <div class="modal" id="assignRobotModal">
        <div class="modal-content">
            <div class="modal-header">
                <h5>分配机器人</h5>
                <span class="close" onclick="closeAssignRobotModal()">&times;</span>
            </div>
            <div class="modal-body">
                <div class="table-container">
                    <table>
                        <thead>
                            <tr>
                                <th><input type="checkbox" onchange="toggleAllRobots(this)"></th>
                                <th>机器人ID</th>
                                <th>型号</th>
                                <th>状态</th>
                                <th>当前位置</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td>R001</td>
                                <td>HT-2024</td>
                                <td><span class="badge bg-success">空闲</span></td>
                                <td>仓库A</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td>R002</td>
                                <td>HT-2024</td>
                                <td><span class="badge bg-success">空闲</span></td>
                                <td>仓库A</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td>R003</td>
                                <td>HT-2023</td>
                                <td><span class="badge bg-warning">维护中</span></td>
                                <td>维修中心</td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td>R004</td>
                                <td>HT-2024</td>
                                <td><span class="badge bg-success">空闲</span></td>
                                <td>仓库A</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeAssignRobotModal()">取消</button>
                <button class="btn btn-primary" onclick="confirmAssignRobot()">确认分配</button>
            </div>
        </div>
    </div>

    <!-- 状态确认弹窗 -->
    <div class="modal" id="statusConfirmModal">
        <div class="modal-content">
            <div class="modal-header">
                <h5>确认操作</h5>
                <span class="close" onclick="closeStatusConfirmModal()">&times;</span>
            </div>
            <div class="modal-body">
                <p>确定要<span id="statusAction">禁用</span>该店铺吗？</p>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeStatusConfirmModal()">取消</button>
                <button class="btn btn-danger" id="confirmStatusBtn">确认</button>
            </div>
        </div>
    </div>

    <script>
        // 切换侧边栏
        function toggleSidebar() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('collapsed');
        }

        // 显示新增店铺表单
        function showAddStoreForm() {
            document.getElementById('storeListPage').style.display = 'none';
            document.getElementById('storeFormPage').style.display = 'block';
            document.getElementById('formTitle').textContent = '新增店铺';
        }

        // 显示编辑店铺表单
        function showEditStoreForm() {
            document.getElementById('storeListPage').style.display = 'none';
            document.getElementById('storeFormPage').style.display = 'block';
            document.getElementById('formTitle').textContent = '编辑店铺';
        }

        // 返回店铺列表
        function showStoreList() {
            document.getElementById('storeFormPage').style.display = 'none';
            document.getElementById('storeListPage').style.display = 'block';
        }

        // 保存店铺
        function saveStore() {
            alert('店铺信息已保存');
            showStoreList();
        }

        // 触发文件上传
        function triggerFileUpload(type) {
            alert(`触发${type}文件上传`);
        }

        // 显示机器人分配弹窗
        function showAssignRobotModal() {
            document.getElementById('assignRobotModal').classList.add('show');
        }

        // 关闭机器人分配弹窗
        function closeAssignRobotModal() {
            document.getElementById('assignRobotModal').classList.remove('show');
        }

        // 确认分配机器人
        function confirmAssignRobot() {
            alert('机器人分配成功');
            closeAssignRobotModal();
        }

        // 全选机器人
        function toggleAllRobots(checkbox) {
            const checkboxes = document.querySelectorAll('#assignRobotModal input[type="checkbox"]');
            checkboxes.forEach(cb => {
                cb.checked = checkbox.checked;
            });
        }

        // 切换店铺状态
        function toggleStoreStatus(action) {
            document.getElementById('statusAction').textContent = action;
            document.getElementById('confirmStatusBtn').className = action === '禁用' ? 'btn btn-danger' : 'btn btn-success';
            document.getElementById('statusConfirmModal').classList.add('show');
        }

        // 关闭状态确认弹窗
        function closeStatusConfirmModal() {
            document.getElementById('statusConfirmModal').classList.remove('show');
        }

        // 确认状态变更
        document.getElementById('confirmStatusBtn').onclick = function() {
            alert(`店铺状态已${document.getElementById('statusAction').textContent}`);
            closeStatusConfirmModal();
        };

        // 菜单点击事件
        document.querySelectorAll('.menu-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>